"The Immigration Division of the Immigration and Refugee Board of Canada may order their arrest and detention pending removal. Notwithstanding the increasing length of Mr. Brown's detention, at each of his subsequent detention reviews the ID ordered that he continue to be detained. In the Federal Court, Mr. Brown, together with the End Immigration Detention Network, a third party with public interest standing, challenged the constitutionality of the immigration detention regime established under sections 57 and 58 of the IRPA and sections 244 to 248 of the Immigration and Refugee Protection Regulations, S.O.R./2002-227. There, the Supreme Court prescribed the process and protections required to ensure that lengthy and indeterminate detention is consistent with detainees' rights under sections 7 and 12 of the Charter. The Supreme Court's conclusions in Charkaoui are set forth in paragraph 96: The s. 12 issue of cruel and unusual treatment is intertwined with s. 7 considerations, since the indefiniteness of detention, as well as the psychological stress it may cause, is related to the mechanisms available to the detainee to regain liberty. Denying the means required by the principles of fundamental justice to challenge a detention may render the detention arbitrarily indefinite and support the argument that it is cruel or unusual [] Elsewhere, at paragraph 105 of Charkaoui, the Supreme Court recognized that immigration detention may have to be or may practically end up being indeterminate: \"[i]t is thus clear that while the IRPA in principle imposes detention only pending deportation, it may in fact permit lengthy and indeterminate detention or lengthy periods subject to onerous release conditions. The Supreme Court held that extended periods of detention under the IRPA do not violate the Charter if they are accompanied by regular review of the reasons for detention, the length of detention, the reasons for the delay in removal, the anticipated future length of detention and the availability of alternatives to detention such as release on conditions. The Supreme Court also foresaw that cases could arise where a particular detention was not Charter compliant. In these circumstances, the Court concluded that, although prolonged detention under the regime established by the IRPA was constitutional, \"[] this does not preclude the possibility of a judge concluding at a certain point that a particular detention constitutes cruel and unusual treatment or is inconsistent with the principles of fundamental justice, and therefore infringes the Charter in a manner that is remediable under s. 24(1) of the Charter\". Charkaoui stands in the way of the appellants' argument that lengthy or indeterminate detention is per se unconstitutional. Analogizing to the principles expressed in R. v. Jordan, 2016 SCC 27, 1 S.C.R. 631 the appellants contend that their section 7 and 9 Charter rights can only be protected by judicially mandated limits on the length of detention or that the scheme should be declared unconstitutional under section 52. The appellants advance a second attack on the detention scheme. The appellants contend that for the detention provisions of the IRPA to pass constitutional muster, it must be impossible for the ID to order detention when there is no reasonable prospect of removal. As will be seen, ID members conducting detention reviews and judges sitting in judicial review, must consider Charter and administrative law standards. Although the appellants' challenge to the validity of the sections fails, many of their arguments are vindicated by what is said in these reasons concerning what judges conducting detention reviews must consider."